const expressJwt = require("express-jwt");
const { secretKey } = require('../utils/salt');

const jwtAuth = expressJwt({
    secret: secretKey,
    algorithms: ['HS256'],
    credentialsRequired: false // false：不校验
}).unless({
    path: ["/users/login", "/users/reg"]
});

module.exports = jwtAuth;